package com.example.sp1.cc;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

//@PropertySource(value = {"classpath:application.yml"})
@ConfigurationProperties()
public class CollectionConfig {
    private List<MyService> services;
    private Map<String,User> users;
    private String[] namess;


    /**
     * 获取
     * @return services
     */
    public List<MyService> getServices() {
        return services;
    }

    /**
     * 设置
     * @param services
     */
    public void setServices(List<MyService> services) {
        this.services = services;
    }

    /**
     * 获取
     * @return users
     */
    public Map<String, User> getUsers() {
        return users;
    }

    /**
     * 设置
     * @param users
     */
    public void setUsers(Map<String, User> users) {
        this.users = users;
    }

    /**
     * 获取
     * @return names
     */
    public String[] getNames() {
        return namess;
    }

    /**
     * 设置
     * @param names
     */
    public void setNames(String[] names) {
        this.namess = names;
    }

    @Override
    public String toString() {
        return "CollectionConfig{services = " + services + ", users = " + users + ", names = " + namess + "}";
    }
}
